/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package DataSetPackage;

/**
 *
 * @author Martin Haulrich
 */
public class ProductView implements View {

    DataSet ds;

    View[] views;


    public ProductView(DataSet ds, View[] views) {
        this.ds = ds;
        this.views = views;
    }


    @Override
    public DataSet getDataSet() {
        return ds;
    }


    
    public synchronized View getView(int[] indices) {
        if (indices.length == 1) {
            return views[indices[0]];
        } else {
            View[] newViews = new View[indices.length];
            for (int i = 0; i < indices.length; i++) {
                newViews[i] = views[indices[i]];
            }
            return new ProductView(ds, newViews);
        }
    }
//
//
////    public Set<Long> getPIDS(int index, long did) {
////        return ds.getPIDS(index, did);
////    }
//
//
//    public Collection<Integer> getColumn(int columnNr, Collection<Integer> dids) {
//        List<Integer> column = new ArrayList<Integer>();
//        for(Integer did : dids) {
//            column.add(data.);
//        }
//    }


  

    public View[] getViews() {
        return views;
    }
}
